const componentProperties = new Map()
let commonStyle = {
	display: null,
	"flex_direction": null,
	"justify_content": null,
	"align_items": null,
	"flex_wrap": null,
	width: {
		value: null,
		type: "px"
	},
	height: {
		value: null,
		type: "px"
	},
	font_size: null,
	line_height: null,
	font_weight: null,
	font_family: null,
	color: null,
	text_align: null,
	padding_top: {
		value: null,
		type: "px"
	},
	padding_left: {
		value: null,
		type: "px"
	},
	padding_bottom: {
		value: null,
		type: "px"
	},
	padding_right: {
		value: null,
		type: "px"
	},
	margin_top: {
		value: null,
		type: "px"
	},
	margin_left: {
		value: null,
		type: "px"
	},
	margin_bottom: {
		value: null,
		type: "px"
	},
	margin_right: {
		value: null,
		type: "px"
	},
}

// 数据版本  每次修改组件数据  需要对版本进行修改
// componentProperties.set('componentPropertiesVersion', 'V1.0.0')
componentProperties.set('kInput', {
	id: '',
	component: 'kInput',
	text: '输入框',
	type: '0-1',
	active: true,
	icon: 'Edit',
	style: 'kInputStyle',
	setStyle: {
		text: '输入框',
		model: '',
		label: '输入框',
		name: 'ruleName',
		placeholder: '请输入内容',
		type: 'text',
		autoHeight: false,
		placeholderStyle: "",
		focus: false,
		disabled: false,
		maxlength: -1,
		styles: Object,
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
})

componentProperties.set('kForm', {
	id: '',
	component: 'kForm',
	text: '表单',
	type: 'container',
	active: true,
	icon: 'Memo',
	style: 'kFormStyle',
	setStyle: {
		text: '表单',
		model: '',
		ref: '',
		rules: '',
		labelPosition: "left",
		labelWidth: 80,
		labelAlign: "left",
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
	pageComponents: []
})

componentProperties.set('WdLayoutCol', {
	id: '',
	component: 'WdLayoutCol',
	text: '布局-列',
	type: 'container',
	active: true,
	icon: 'Menu',
	style: 'WdLayoutColStyle',
	setStyle: {
		text: '布局-列',
		span: 24,
		offset: 0,
		push: 0,
		pull: 0,
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
	pageComponents: []
})

componentProperties.set('WdLayout', {
	id: '',
	component: 'WdLayout',
	text: '布局',
	type: 'container',
	active: true,
	icon: 'Menu',
	style: 'WdLayoutStyle',
	setStyle: {
		text: '布局',
		gutter: 0,
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
	pageComponents: []
})

componentProperties.set('WdNotice', {
	id: '',
	component: 'WdNotice',
	text: '公告',
	type: '1-7',
	customIcon: 'icon-gonggao',
	active: true,
	style: 'WdNoticeStyle',
	setStyle: {
		text: '公告',
		noticeText: '请填写内容，如果过长，将会在手机上滚动显示', //内容
		backColor: 'rgb(255, 248, 233)', //背景颜色
		textColor: 'rgba(100, 101, 102)', //文字颜色
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
})

componentProperties.set('WdCaptiontext', {
	id: '',
	component: 'WdCaptiontext',
	text: '标题文字',
	type: '1-3',
	active: true,
	customIcon: 'icon-Component-biaotiwenzi',
	style: 'WdCaptiontextStyle',
	setStyle: {
		text: '标题文字',
		name: '标题文字', //标题内容
		description: '这里输入描述内容', //描述内容
		wordSize: 14, //标题大小
		descriptionSize: 12, //描述大小
		wordWeight: 400, //标题粗细
		positions: 'left', //显示位置  可选left/center
		wordColor: 'rgba(50, 50, 51, 10)', //标题颜色
		descriptionColor: 'rgba(150, 151, 153, 10)', //描述颜色
		backColor: 'rgba(255, 255, 255, 10)', //背景颜色
		type: "empty",
		more: { //查看更多
			show: false, //是否显示查看更多
			type: 1, // 样式选择
			text: '查看更多', //自定义文字
			httpType: 10, //链接类型
			http: '', //链接
		},
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
})

componentProperties.set('listswitching', {
	id: '',
	component: 'listswitching',
	text: '商品',
	type: '2-1',
	customIcon: 'icon-goods',
	active: true,
	style: 'listswitchingstyle',
	setStyle: {
		text: '商品',
		commodityType: 0,
		moditystyle: 0,
		borderRadius: 0,
		pageMargin: 15,
		commodityMargin: 10,
		textWeight: 400,
		positions: 'left',
		priceofcommodity: true,
		purchasebutton: true,
		commoditycorner: true,
		purchasebuttonType: 0,
		commoditycornertype: 0,
		commodityTagColor: '#07c160',
		tagPosition: 0,
		imageList: [],
		purchase: '马上抢',
		commoditylisttype: 0,
		commoditylisttypetab: [{
				text: '分组',
				imageList: [],
			},
			{
				text: '分组',
				imageList: [],
			},
		],
		tabColor: '#f39800',
		showMore: false,
		moreUrl: null,
		bgImg: '',
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
})

componentProperties.set('WdPictureads', {
  id: '',
  component: 'WdPictureads',
  text: '轮播图',
  type: '1-3',
  customIcon: 'icon-tupianguanggao',
  active: true,
  style: 'WdPictureadsStyle',
	setStyle: {
		text: '轮播图',
		swiperType: 0, // 选择模板
		borderRadius: 0, // 图片倒角
		pageMargin: 0, // 页面边距
		imageMargin: 0, // 图片边距
		pagingType: 0, // 分页类型: 0/"bullets"/"fraction"/"progressbar"
		rowindividual: 2, // 一行个数
		imageList: [], // 添加图片
		swiperItemProps: {
			autoplay: 3000,
			duration: 500,
			width: '100%',
			height: '200px',
			loop: true,
			showIndicators: true,
			vertical: false,
			touchable: true,
			indicatorColor: '#1989fa'
		},
		Advanced: {
			customClass: "",
			contentClass: "",
			iconClass: "",
			textClass: ""
		},
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
})

componentProperties.set('graphicnavigation', {
	id: '',
	component: 'graphicnavigation',
	text: '图文导航',
	type: '1-4',
	icon: 'icon-icon_tupiandaohang',
	active: true,
	style: 'graphicnavigationstyle',
	setStyle: {
		text: '图文导航',
		imageList: [], // 图片导航列表
		navigationType: 0, //图片导航类型
		imgStyle: 0, //图片样式
		backgroundColor: 'rgb(255, 255, 255)', //背景颜色
		textColor: 'rgb(0, 0, 0)', //文字颜色
		borderRadius: 0, //图片倒角
		showSize: 5, //一屏显示个数
		textHeight: 24, // 字体高度
		textSize: 12, // 字体大小
		bgImg: '',
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
})

componentProperties.set('WdCellGroup', {
	id: '',
	component: 'WdCellGroup',
	text: '单元格组',
	type: '1-4',
	customIcon: 'icon-jinrudianpu',
	active: true,
	style: 'WdCellGroupStyle',
	setStyle: {
		text: '单元格组',
		title: '单元格组标题',
		cells: [
			{
				title: '单元格1',
				note: '描述信息',
				icon: 'user-o',
				rightText: '内容',
				url: ''
			},
			{
				title: '单元格2', 
				note: '描述信息',
				icon: 'setting-o',
				rightText: '内容',
				url: ''
			}
		],
		Advanced: {
			customClass: "",
			contentClass: "",
			iconClass: "",
			textClass: ""
		},
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	}
})

componentProperties.set('WdGrid', {
	id: '',
	component: 'WdGrid',
	text: '宫格导航',
	type: '1-4',
	customIcon: 'icon-icon_tupiandaohang',
	active: true,
	style: 'WdGridStyle',
	setStyle: {
		text: '宫格导航',
		gridProps: {
			columnNum: 5,
			iconSize: 28,
			gutter: 0,
			border: true, //是否显示边框
		},
		gridItemProps: [{
				text: '商城',
				icon: 'balance-pay',
				url: '/page/index/index',
				iconColor: 'rgba(255, 69, 0, 1)',
				linkType: 'navigateTo',
				useSlot: false,
				slotImageSrc: 'https://img.yzcdn.cn/vant/apple-1.jpg'
			},
			{
				text: '订单',
				icon: 'balance-list-o',
				url: '/page/index/index',
				iconColor: 'rgba(144, 238, 144, 1)',
				linkType: 'navigateTo',
				useSlot: false,
				slotImageSrc: 'https://img.yzcdn.cn/vant/apple-2.jpg'
			},
			{
				text: '购物车',
				icon: 'shopping-cart-o',
				url: '/page/index/index',
				iconColor: 'rgba(30, 144, 255, 1)',
				linkType: 'navigateTo',
				useSlot: false,
				slotImageSrc: 'https://img.yzcdn.cn/vant/apple-3.jpg'
			},
			{
				text: '我的',
				icon: 'user-o',
				url: '/page/index/index',
				iconColor: 'rgba(255, 140, 0, 1)',
				linkType: 'navigateTo',
				useSlot: false,
				slotImageSrc: 'https://img.yzcdn.cn/vant/apple-4.jpg'
			},
			{
				text: '宫格',
				icon: 'apps-o',
				url: '/page/index/index',
				iconColor: 'rgba(255, 215, 0, 1)',
				linkType: 'navigateTo',
				useSlot: false,
				slotImageSrc: 'https://img.yzcdn.cn/vant/apple-5.jpg'
			},
		],
		Advanced: {
			customClass: "",
			contentClass: "",
			iconClass: "",
			textClass: ""
		},
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
})

componentProperties.set('richtext', {
	id: '',
	component: 'richtext',
	text: '富文本',
	type: '1-10',
	customIcon: 'icon-fuwenben',
	active: true,
	style: 'richtextstyle',
	setStyle: {
		text: '富文本',
		myValue: '', //富文本内容
		backColor: 'rgb(249, 249, 249)', //背景颜色
		commonstyle: JSON.parse(JSON.stringify(commonStyle))
	},
})

// 其他组件定义保持不变...
export default componentProperties
